﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace EntityFrameworkETL.Test
{
    [TestClass]
    public class BatchCommandTest
    {
        [TestMethod]
        public void TestMethod1()
        {
            //var worlds = new List<World>();
            //var earth = new World("Earth");
            //earth.Persons.Add(new Person("Chris"));
            //earth.Persons.Add(new Person("Megan"));
            //worlds.Add(earth);
            //var mars = new World("Mars");
            //var perrin = new Person("Perrin");
            //perrin.Jobs.Add(new Job() { Name = "FirstJob" });
            //mars.Persons.Add(perrin);
            //mars.Persons.Add(new Person("David"));
            //worlds.Add(mars);

            var sqlWorld = @"INSERT [dbo].[Worlds]([Name])
VALUES (@0)
SELECT [Id]
FROM [dbo].[Worlds]
WHERE @@ROWCOUNT > 0 AND [Id] = scope_identity()";
            var sqlPerson =
                @"INSERT [dbo].[People]([Name], [WorldId])
VALUES (@0, @1)
SELECT [Id]
FROM [dbo].[People]
WHERE @@ROWCOUNT > 0 AND [Id] = scope_identity()";

            var sqlJob = @"INSERT [dbo].[Jobs]([Name], [PersonId])
VALUES (@0, @1)
SELECT [Id]
FROM [dbo].[Jobs]
WHERE @@ROWCOUNT > 0 AND [Id] = scope_identity()";
        }
    }
}
